var util = require('../../utils/util.js');
//获取应用实例
const app = getApp()

Page({
  data: {
    userInfo:'',
  },

  onLoad: function () {
    var that = this;
    wx.getStorage({
      key: 'userInfo',
      success: function (res) {
        that.setData({
          userInfo:res.data
        })
      }
    })
  },
  logout:function () {
    app.wxPost(app.globalData.host + '/shopuser/logout').then(res => {
      app.showToastNone('退出成功',1000);
      setTimeout(function(){
        wx.redirectTo({
          url: '../login/login',
        })
      },1000)
    });
  }
})
